const express = require('express')
const router = express.Router()

// 导入路由处理函数对应的模块
const user_handler = require('../router-handler/user')
// 导入express-joi
const expressjoi = require('@escook/express-joi')
// 导入验证规则
const { reg_login_schema } = require('../schema/user')
// 注册新用户
router.post('/reguser', expressjoi(reg_login_schema), user_handler.regUser)
// 登录
router.post('/login', expressjoi(reg_login_schema), user_handler.login)
// 
module.exports = router